﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jayden.Dll.Cards.Poker.Enums;

namespace Jayden.Dll.Cards.Poker
{
	public class PokerTableSeat
	{
		private PokerTable m_Table;
		private int m_Index;
		private PokerPlayer m_Player;
		private PokerSeatState m_State;
		private ulong m_Stack;

		public PokerTableSeat(PokerTable table, int index)
		{
			m_Table = table;
			m_Index = index;
			m_State = PokerSeatState.Empty;
		}

		public PokerTable Table { get { return m_Table; } }
		public int Index { get { return m_Index; } }
		public PokerPlayer Player { get { return m_Player; } set { m_Player = value; } }
		public PokerSeatState State { get { return m_State; } set { m_State = value; } }
		public ulong Stack { get { return m_Stack; } set { m_Stack = value; } }

		public bool IsAllIn { get { return m_Stack == 0 && m_State == PokerSeatState.Playing; } }

		public override string ToString()
		{
			return string.Format("Seat #{0}: {1} ({2})", Index + 1, Player.Login, Stack);
		}
	}
}
